#!/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -n -t tmpfs -o mode=0755 udev /dev
mknod -m0666 /dev/null c 1 3
mknod -m0600 /dev/kmsg c 1 11
mknod -m0600 /dev/initctl p
mkdir /dev/shm
chmod 1777 /dev/shm
echo "">/sys/kernel/uevent_helper
udevd --daemon
mkdir -p /dev/.udev/queue
udevadm trigger
udevadm settle
mount /dev/sda1 /mnt
mkdir /mnt/proc
mkdir /mnt/sys
mkdir /mnt/dev
mount -t proc none /mnt/proc
mount -t sysfs none /mnt/sys
cp -af /dev/* /mnt/dev
killall -9 udevd
exec /sbin/switch_root /mnt /sbin/init
